<style type="text/css">
	.report-content-container {
		/*padding-left:10px;*/
		padding-right:10px;
	}
	
		.content-templates {
			float:left;
			margin-bottom:5px;
			padding-left:10px;
			width:315px;
		}
		
			.content-templates fieldset{
				margin-top:10px;
				padding-left:10px;
				padding-top:5px;
			}
			
				.template-filters { margin-bottom: 5px;}
				.template-list {
					margin-bottom:5px;
					overflow:hidden;
					width:300px;
				}
					.template-list select#templates { width:290px;}
					
		.template-preview{
			float:right;
			margin-bottom:5px;
			width:315px;
		}
			.template-preview fieldset{
				margin-top:10px;
				padding-left:10px;
				padding-top:5px;
			}
		
				.template-preview fieldset p{ height: 70px; overflow:auto;}
				
			.template-preview p.actions-bar{
				margin:0; padding-left:80px;
			}
	
		.report-content-edition{
			padding-left:10px;
			width:650px;
		} 
</style>
<div class="report-content-container" >
	<div class="content-templates" >
		<fieldset>
			<legend>&nbsp;Plantillas de <?php echo $template_content_entity;?>&nbsp;</legend>
			<div class="template-filters">
				<input type="radio" name="template-filter" value="all" checked="checked" /><label style="margin-right:1em;">Todos</label>
				<input type="radio" name="template-filter" value="male" /><label style="margin-right:1em;">Hombres</label>
				<input type="radio" name="template-filter" value="female" /><label style="margin-right:1em;">Mujeres</label>
			</div>
			 <div class="template-list">
				<select multiple="true" id="templates" name="templates"  size="5">
					<?php foreach($templates as $id=>$template){?>
						<option value="<?php echo $id; ?>"><?php echo $template[0];?></option>
					<?php }?>
				</select>
			</div>
		</fieldset>
	</div>
	
	
	<div class="template-preview" >
		<fieldset>
			<legend>&nbsp;Vista Previa&nbsp;</legend>
			
			<p id="preview" >- No se ha seleccionado ninguna plantilla -</p>
			<a style="display:none;" id="TemplateDialog" href="<?php echo $template_new; ?>"></a>
		</fieldset>
		
		<p class="actions-bar">
			<input id="AddPreview" type="button" class="button" value="Agregar" />
			<input id="NewTemplate" type="button" class="button" value="Nueva Plantilla" />
		</p>
	</div>
	
	<hr class="clear-contentunit" style="width:660px;margin-left:10px;"></hr>
	
	 
	<div class="report-content-edition">
		<h1>Edici&oacute;n <?php echo $template_content_entity;?> Informe</h1>
		<textarea id="content" rows="5" cols="80"><?php echo $report_content;?></textarea>
		<input type="button" class="button" id="btnSaveContent" name="btnSaveContent" value="Guardar cambios" />
	</div>
</div>
<script type="text/javascript" src="media/js/js_controls/js_report-template.js"></script>
<script type="text/javascript">
	//feed url, preview url, content_saveurl
	TemplateReportWidget.init('<?php echo $templates_feed;?>', '<?php echo $preview_feed; ?>', '<?php echo $content_save; ?>');	
</script>